/**
 * 
 */
package com.photomap.UI;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

/**
 * @author cheng
 *
 */
public class LoginActivity extends Activity {
	private EditText username,password;
	private Button ok,cancel;
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setTheme(R.style.Translucent);
        setContentView(R.layout.login);
        ok = (Button)findViewById(R.id.ok);
        ok.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				username = (EditText)findViewById(R.id.userid);
		        password = (EditText)findViewById(R.id.password);
		       
		        String str_username = username.getText().toString();
		        String str_password = password.getText().toString();
		        
		        Bundle b = new Bundle();
		        b.putString("username", str_username);
		        b.putString("password", str_password);
		        Intent intent = new Intent(LoginActivity.this,MainPanelActivity.class);
		        intent.putExtras(b);
		        
				startActivityForResult(intent, 1);
			}
		});
  }
}
